package com.randomrpg.game

object XPTable {
  val xptable = for(i <- 1 until 21) yield i * i * 150
  
  def toNextlevel(level: Int): Int = xptable(level - 1)
  
  def giveXP(level: Int) = level * level * (30 - level)
  
  def leveled(level: Int, xp: Int): Boolean = xptable(level - 1) < xp
}